//
//  Statistics.swift
//  SLQuickReader
//
//  Created by ALin on 2017/8/3.
//  Copyright © 2017年 ALin. All rights reserved.
//

import UIKit
import ObjectMapper
import SwiftyJSON

class Statistics: Mappable {
    /// 分类名称
    var name: String?
    /// 图书数量
    var bookCount: UInt64 = 0
    /// 是否是最热
    var isHot: Bool = false
    
    required init?(jsonData: JSON) {
        self.name = jsonData["name"].string
        self.bookCount = jsonData["bookCount"].uInt64Value
        if self.bookCount > 100000 {
            self.isHot = true
        }
    }
}

